package com.gzwanchuang.xhgj.ui.page.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.module.LoadMoreModule;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.gzwanchuang.xhgj.R;
import com.gzwanchuang.xhgj.proto.Mergedintoaccount;

import java.util.List;

/**
 * 文件名 : ZhanDanAdapter
 * 创建者 : MangoWang
 * 创建日期 : 2019/12/26 15:44
 * 微信 : MangoWaWang
 * 邮箱 : 763482205@qq.com
 * 描述 : TODO
 */
public class HeHistoryAdapter extends BaseQuickAdapter<Mergedintoaccount.record, BaseViewHolder> implements LoadMoreModule {
    public HeHistoryAdapter(List<Mergedintoaccount.record> data) {
        super(R.layout.item_old_order, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Mergedintoaccount.record item) {

        String status = "";
        switch (item.getStatus()) {
            case "INIT":
                status = "待处理";
                break;
            case "DOING":
                status = "处理中";
                break;
            case "SUCCESS":
                status = "提现成功";
                break;
            case "FAIL":
                status = "提现失败";
                break;
        }

        helper.setText(R.id.tv_money,"¥" + item.getAmount())
                .setText(R.id.tv_bishu, item.getCount() + "笔交易")
                .setText(R.id.tv_status, status)
                .setText(R.id.tv_time,item.getDate());

    }


}
